package com.shenmazong.string;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

/**
 * @program: server-java-demo
 * @description: StringHashCode
 * @author: 亮子说编程
 * @create: 2020-10-16 16:17
 **/
public class StringHashCode {

    public static void main(String[] args) {
        HashMap<String, Integer> map = new HashMap<String, Integer>();

        List<String> list = Arrays.asList("Aa", "BB", "C#", "重地", "通话");
        for(String s: list) {
            System.out.println(s.hashCode());

            map.put(s, s.hashCode());
        }
        System.out.println(map);
    }
}
